@charset "UTF-8";

input:-webkit-autofill {   /* 修复webkit下autocomplete黄色背景的问题 */
    box-shadow: 0 0 0 100px $white inset;
}

/* 文本框占位符颜色定义（不同浏览器必须分开设置，合并设置无效） */
$muted-gray: lighten(desaturate($gray, 15%), 5%);  // #c5c7c9;
::-webkit-input-placeholder    {color: $muted-gray;}
::-moz-placeholder             {color: $muted-gray;}

input::-moz-placeholder,
textarea::-moz-placeholder     {color: $muted-gray;}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {color: $muted-gray;}

[readonly] {
    cursor: default;
}

// input 基础样式
%input-base {
	display: inline-block;
	width: 100%;
	height: $input-size-md;

    padding: 3px $input-pd-lr;
    box-sizing: border-box;
    vertical-align: top;
    line-height: 1;

    font-size: $btn-ft-size;
    color: $black;
    background: $white;
    border: 1px solid $gray;
    border-radius: $input-radius;
    outline: none;

	transition: border-color .15s ease-in-out,
				box-shadow .15s ease-in-out;

    &:hover {
        border-color: darken($dark-gray, 6%);
    }

    &:focus {
        outline: none;
		border-color: $blue;
		box-shadow: 0 0 0 2px rgba($blue, .2);
    }

    &[disabled] {
        color: $gray;
        background-color: $dark-white;
        border-color: lighten($gray, 10%);
    }
}

.#{$ns-obj}input {
    @extend %input-base;
}

.input-lg {
    height: $input-size-lg;
    font-size: $btn-ft-size + 2px;
}

.input-sm {
    height: $input-size-sm;
    font-size: $btn-ft-size - 1px;
}

.input-xs {
	$xs-font-size: $btn-ft-size - 4px;
	@if $xs-font-size < $min-font-size {
		$xs-font-size: $min-font-size;
	}

    height: $input-size-xs;
	font-size: $xs-font-size;
}

textarea.#{$ns-obj}input {
	height: auto;
    padding: 5px 8px;
    line-height: 1.5;
}
